import { Base } from '../../utils/base.js';

class News extends Base {
  constructor() {
    super();
  }

  getDetailInfo(id, callback) {
    var param = {
      url: 'news/' + id,
      sCallback: function (data) {
        callback && callback(data);
      }
    };
    this.request(param);
  }

  getNews(callback) {
    var param = {
      url: 'news/list?page=1&size=10',
      sCallback: function (data) {
        callback && callback(data);
      }
    };
    this.request(param);
  }
};

export { News }